Note: if you are interested in comipiling the PPC version with Symantec 8.0, drop me a note. (mailto:macspd@ivo.cps.unizar.es)
• About the sources....
MacGzip was developed mainly from two sources: gzip 1.2.4 original distribution (by Jean-loup Gailly) and the example source code from Apple's Developer CD Series. I must mention also Quinn <quinn@cs.uwa.edu.au> (et al) for Internet Config Prog Kit., and Erling Johansen <ejo@vingmed.no>, who made the first PPC porting (0.3b3, b3 and b5)
(In MacGzip's readme, you can find a list of involuntary contributions, and also in the source code)
Part of the Apple source code comes from Snippets
(Snippets are not tested by anyone, except (presumably) the author. They are NOT to be considered the final or best way to do something. They are just bits of code that the DTS engineers and others come up with and feel might be useful to developers. Think of Snippets as a "Bucket 'o Rusty Parts" that is provided for your browsing pleasure, NOT as polished examples. A Snippet should only be used in a commercial application if YOU are sure that it does what you want. )
so, you can apply this to macgzip sources, too.
In earlier versions (specially the ones previous to 0.3), the mac code (and gzip.c) was really bad in some points. I think this time it is better, but if you want to use somethig as example, check it carefully).
In 1.0b0 there are a bunch of stupid (but serious) bugs, I think they all are fixed in this release (who knows?)
• The sources
'GNU' folder contains GNU sources and documentation, several files had been modified. If you find some error here, probably is mine.
In this release (1.0x) gzip sources were modified in the right way (using the correct #ifdefs, this wasn't true for previous versions), so you can compile the sources in the same machines as original gzip 1.2.4 sources.(I hope)
(choosing the original gzip.c, which I renamed to gzip.c.cln)
"#define MACOS" options are generic for every Mac OS (I guess), for MacGzip only options I use "#define MACGZIP" (in the first lines of 'tailor.h').
Note: #define MAXSEG_64K is required by unlzw.c in order to decompress Unix .Z files.
Note: In Symantec C, you can't compile gzip using 4 bytes integers; some ANSI functions are implemented in 68K .asm format, and they expect 2 bytes ints.
Changes:
-Standard output and error by alerts.
-Insert here an there System Tasks to be nice with other applications and to update progress bar. (for example one call in the 'fill the input buffer' function)
-other... (Search MACGZIP || MACOS || spd)
Note: Some of the command line options (-vlt) are not available just because they require aditional Macintosh interface; but using Think C console (and the original gzip.c.cln with some little modifications), they should work.
'Mac' folder holds some files from Internet Config Programmers Kit, and the sources of the interface; they can be reused with some minor changes for any other file processing (input file + few parameters -> output file).
There are several ways in which this source could be improved; here you are some:
-MacAE.c:
High Level Events with aditional parameters
-GzErrors.c:
Draw a color 'rotate' icon (instead of a 'SICN')
-Work.c:
There must be a better way to do this...
-PrefsDlg.c:
Make dialog not modal
-MacIO.c:
Is a generic library to do transparent IO in ascii/bin/macbinary mode. It has some limitations: It doesn't support O_APPEND, etc...; and the macbinary code does not saves/restores finder comments (I hate Finder Comments, anyway)
Generic:
Change all literal strings to resources (very boring work; too many #ifdefs for GNU sources.)
Use the thread manager instead of such confusing event loop.(?)
In 'Resources' you can find some .rsrc files and some .r text files.
Since CW can't compile (Rez) .r files, you will need an external tool to convert them to actual resources (or you can copy the resources from MacGzip application...)